Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix buffer overrun in CPUParticles3D in precision=double builds #74555

Merged

Conversation

RedworkDE
Copy link
Member

ptr are always floats so on double builds this line would clear 24 elements instead of 12. Normally this doesn't change anything, except that a few entries get cleared, just to be overwritten later / in the next iteration, but for the last element this zeros 16 bytes past the end of the valid data of the vector.

@RedworkDE RedworkDE requested a review from a team as a code owner March 7, 2023 15:09
@akien-mga akien-mga added this to the 4.1 milestone Mar 7, 2023
@akien-mga akien-mga changed the title Fix buffer overrun in CPUParticles3D Fix buffer overrun in CPUParticles3D in precision=double builds Mar 7, 2023
@akien-mga akien-mga requested a review from clayjohn March 7, 2023 15:23
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@akien-mga akien-mga merged commit 449e658 into godotengine:master Mar 8, 2023
@akien-mga
Copy link
Member

Thanks!

@RedworkDE RedworkDE deleted the cpuparticles3d-update-buffer-overrun branch March 8, 2023 14:43
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants